package com.metadata_system.common.db.entity;

import java.util.Date;
import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Table(name = "md_upload_file")
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class UploadFile {
    @Id
    private Integer id;

    /**
     * 用户ID
     */
    @Column(name = "user_id")
    private Integer userId;

    /**
     * 文件-地址
     */
    private String file;

    /**
     * 文件-大小
     */
    private Long size;

    /**
     * 文件-类型
     */
    private String type;

    /**
     * 上传时间
     */
    @Column(name = "created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;
}
